#ifndef __STDUDP_H_
#define __STDUDP_H_

#include <stdbool.h>
#include <stddef.h>

class StdUdpServer
{
public:
    StdUdpServer();
    StdUdpServer(const char* ip,unsigned short port);
    ~StdUdpServer();
    bool UdpSRecv(void *ptr,size_t size);
    bool UdpSSend(const char *ip,unsigned short port,void *ptr,size_t size);
private:
    int m_sock;  
};


class StdUdpClient
{
public:
    StdUdpClient(const char *ip,unsigned short port);
    ~StdUdpClient();
    bool UdpCRecv(void *ptr,size_t size);
    bool UdpCSend(void *ptr,size_t size);
private:
    int m_sock;
    char m_ServerIP[16];
    unsigned short m_Port;
};

#endif